package com.spzx.channel.controller;

import com.spzx.channel.service.ListService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.page.TableDataInfo;
import com.spzx.product.api.domain.SkuQuery;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ListController
 * @Author 波
 * @Date 2024/8/5 18:47
 */
@RestController
@RequestMapping("/list")
@Tag(name = "商品列表管理")
public class ListController extends BaseController {

    @Autowired
    private ListService listService;

    @Operation(summary = "获取商品列表")
    @GetMapping("/skuList/{pageNum}/{pageSize}")
    public TableDataInfo getSkuList(@PathVariable Integer pageNum, @PathVariable Integer pageSize, SkuQuery skuQuery) {
        return listService.getSkuList(pageNum, pageSize, skuQuery);
    }
}
